//-----------------Sonic CD Smoke Puff Script-----------------//
//--------Scripted by Christian Whitehead 'The Taxman'--------//
//-------Unpacked By Rubberduckycooly's Script Unpacker-------//

// Aliases
private alias Object.Value0 : Object.Timer


event ObjectDraw
	DrawSprite(Object.Frame)
	
	Object.Timer++
	if Object.Timer > 3
		Object.Timer = 0
		
		Object.Frame++
		if Object.Frame > 4
			
			// Unload once animation is over
			Object.Type = TypeName[Blank Object]
			Object.Frame = 0
			
		end if
	end if
	
end event


event ObjectStartup
	
	LoadSpriteSheet("3D_Test/Objects.gif")
	
	// Smoke Puff Frames
	
	SpriteFrame(-16, -8, 32, 16, 1, 134)
	SpriteFrame(-16, -16, 32, 32, 1, 151)
	SpriteFrame(-16, -16, 32, 32, 1, 184)
	SpriteFrame(-24, -24, 48, 48, 34, 134)
	SpriteFrame(-24, -24, 48, 48, 34, 183)
	
end event


// ========================
// Editor events
// ========================

event RSDKDraw
	DrawSprite(0)
end event


event RSDKLoad
	LoadSpriteSheet("3D_Test/Objects.gif")
	SpriteFrame(-16, -8, 32, 16, 1, 134)

	SetVariableAlias(ALIAS_VAR_PROPVAL, "unused")
end event
